package com.app.micaihu.view.main.topic;

import android.content.Context;
import android.graphics.Bitmap;
import android.util.AttributeSet;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.app.micaihu.R;
import com.app.utils.util.ViewSizeUtils;

/**
 * Created by Guo on 2017/2/15.
 * 待删除按钮的 imageview
 */

public class PicWithDel extends FrameLayout {
    private Bitmap bitmap;

    public PicWithDel(Context context, Bitmap bitmap) {
        super(context);
        this.bitmap = bitmap;
        init(context);
    }


    private void init(Context context) {
        inflate(context, R.layout.send_grid_item, this);
        ImageView pic = (ImageView) findViewById(R.id.image);
        ImageView del = (ImageView) findViewById(R.id.image_delete);
        ViewSizeUtils.changeViewAuto720(pic, 140, 140);
        pic.setImageBitmap(bitmap);
    }
}
